#! -*- coding: utf-8 -*-
"""
星华惠康处方审核信息
"""

import time, datetime
from mongoengine import Document, StringField, IntField, BooleanField

class XingHuaAudit(Document):
    # _id = StringField(required=True, primary_key=True)
    pres_id = StringField()
    code = IntField()
    phar_id = StringField()
    results = StringField()
    med_info = StringField()

    obsoleted = BooleanField(default=False)
    created_at = IntField(default=int(time.time() * 1000))
    updated_at = IntField(default=int(time.time() * 1000))


    meta = {
        'collection': 'XingHuaAudit',    #指定collection的名字
        'ordering': ['-updated_at'],
        'indexes': [
            ('code'),
            ('phar_id')
        ]
    }
